package com.card;

import com.card.main.MainApp;
import com.xiaoao.net.main.ScanRunner;
import com.xiaoao.net.main.ShutdownHook;

import sun.misc.Signal;
import sun.misc.SignalHandler;

public class HlServer {
	public static void main(String[] args) {
		System.setProperty("Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector");
        System.setProperty("AsyncLogger.ExceptionHandler", "com.xiaoao.fsgame.server.util.LogExceptionHandler");
        SignalHandler handler = new SignalHandler() {
            @Override
            /**
             * do nothing
             */
            public final void handle(Signal sig) {
            }
        };

        Signal.handle(new Signal("INT"), handler);
        Thread scan = new Thread(new ScanRunner(new MainApp()), "Scanner");
        Runtime.getRuntime().addShutdownHook(ShutdownHook.getInstance());
        scan.start();
	}
}
